import requests
from common.get_header import get_header


class IhrmDeleteDep(object):
    def delete_dep(self, dep_id,token):
        resp = requests.delete(url=f"http://ihrm2-test.itheima.net/api/company/department/{dep_id}",
                               headers={"Authorization": token})
        return resp

if __name__ == '__main__':
    ihrm = IhrmDeleteDep()

    req_header = get_header().get("Authorization")
    req_data = {"name": "测试部", "code": "00001"}
    ret = ihrm.delete_dep(1570783008577941504,req_header)
    print(ret.json())